package com.sinai.mshab.client.ui.validate;

import com.sinai.mshab.client.ui.basic.BasicFormComponent;

/**
 * Validates to true if the value contains a valid email address.
 * @author serge
 *
 */
public class EmailValidator extends Validator {

	/**
	 * The regex for emails.
	 * 
	 * 
	 */
	private final String EMAIL_REGEX = "^[\\d\\w\\.]*@[\\d\\w]+\\.[\\w\\.]+";
	
	public boolean validate(BasicFormComponent component) {
		return super.validate(component, EMAIL_REGEX);
	}

}
